package com.zhongyu.boot;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class ConsumerListener {

    @RabbitListener(queuesToDeclare = {@Queue(name="item_direct_queue01")})
    public void acceptMsg(Message message){
        System.out.println("item_direct_queue01获取信息："+message.getBody());
    }



}
